package com.lvyou.service;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lvyou.entity.UserModel;
import com.lvyou.mapper.IUserMapper;
import com.lvyou.util.UUIDTools;

@Service("userSrv")
public class UserSrv {

	
	@Resource
	private IUserMapper dao;
	
	public void reg(UserModel um) throws Exception{
		
		um.setId(UUIDTools.randomUUID());
		um.setRole("100");
		um.setStatus("1");
		Date date=new Date();
		um.setCreateTime(date);
		um.setUpdateTime(date);
		
		dao.saveUser(um);
	}
	public List queryByPhone(String phone) throws Exception {
		return dao.queryByPhone(phone);
	}



}
